﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

public class OrderClass
{
    DBClass dbObj = new DBClass();
    CommonClass ccObj = new CommonClass();
	public OrderClass()
	{
		//
		// TODO: 在此处添加构造函数逻辑
		//
	}
    // 详细查询订单信息
    public DataTable ExactOrderSearch(int IntOrderID,int IntNF,string strName,int IntIsConfirm,int IntIsSend)
    {
        SqlCommand myCmd = dbObj.GetCommandProc("Proc_SearchOI");
        //添加参数
        SqlParameter orderId = new SqlParameter("@OrderID", SqlDbType.Int, 4);
        orderId.Value = IntOrderID;
        myCmd.Parameters.Add(orderId);
        SqlParameter nf = new SqlParameter("@NF", SqlDbType.Int, 4);
        nf.Value = IntNF;
        myCmd.Parameters.Add(nf);
        SqlParameter name = new SqlParameter("@Name", SqlDbType.VarChar, 50);
        name.Value = strName;
        myCmd.Parameters.Add(name);
        SqlParameter confirm = new SqlParameter("@IsConfirm", SqlDbType.Int, 4);
        confirm.Value = IntIsConfirm;
        myCmd.Parameters.Add(confirm);
        SqlParameter send = new SqlParameter("@IsSend", SqlDbType.Int, 4);
        send.Value = IntIsSend;
        myCmd.Parameters.Add(send);
        
        dbObj.ExecNonQuery(myCmd);
        DataTable dsTable = dbObj.GetDataSet(myCmd, "tbOI");
        return dsTable;

    }
   
}
